//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef _Pratt2Patterns_h__
#define	_Pratt2Patterns_h__
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include "PatternRecord.h"
#include "PatternMatches.h"
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
class Pratt2Patterns {
  
  private:
    
    String*                  namefile;
    
    int                      code;   
    int                      numberSeq;//Analyzing # sequences from file input
    
    int                      cM;       //CM: min Nr of Seqs to Match
    double                   cPercent; //C%: min Percentage Seqs to Match            (90, 80, 60, 40, 20)
    
    String*                  pP;       //PP: pos in seq [off,complete,start]         off
    int                      pL;       //PL: max Pattern Length                      50
    int                      pN;       //PN: max Nr of Pattern Symbols               50
    int                      pX;       //PX: max Nr of consecutive x's               5
    int                      fN;       //FN: max Nr of flexible spacers              3
    int                      fL;       //FL: max Flexibility                         5
    int                      fP;       //FP: max Flex.Product                        104
    bool                     bI;       //BI: Input Pattern Symbol File               off
    int                      bN;       //BN: Nr of Pattern Symbols Initial Search    20

    String*                  s;        //S: Scoring [info,mdl,tree,dist,ppv]         info
    
    String*                  g;        //G: Pattern Graph from [seq,al,query]        seq
    int                      e;        //E: Search Greediness                        3
    bool                     r;        //R: Pattern Refinement                       on
    bool                     rG;       //RG: Generalize ambiguous symbols            on
    
    String*                  oF;       //OF: Output Filename                         output
    bool                     oP;       //OP: PROSITE Pattern Format                  on
    int                      oN;       //ON: max number patterns                     5000
    int                      oA;       //OA: max number Alignments                   0
    bool                     m;        //M: Print Patterns in sequences              on
    int                      mR;       //MR: ratio for printing                      10
    bool                     mV;       //MV: print vertically                        off
    
    TListE <PatternRecord>*  patterns;
    TListE <PatternMatches>* matches;
    
    String*                  toString;

  public:
    
    Pratt2Patterns ();
    Pratt2Patterns (const Pratt2Patterns&);
    Pratt2Patterns (const Pratt2Patterns*);
    
    ~Pratt2Patterns ();
    
    void                     Namefile (String*);
    void                     Code (int);
    void                     NumberSeq (int);
    void                     CM (int);
    void                     CPercent (double);
    void                     PP (String*);
    void                     PL (int);
    void                     PN (int);
    void                     PX (int);
    void                     FN (int);
    void                     FL (int);
    void                     FP (int);
    void                     BI (bool);
    void                     BN (int);
    void                     S (String*);
    void                     G (String*);
    void                     E (int);
    void                     R (bool);
    void                     RG (bool);
    void                     OF (String*);
    void                     OP (bool);
    void                     ON (int);
    void                     OA (int);
    void                     M (bool);
    void                     MR (int);
    void                     MV (bool);
    void                     Patterns (TListE <PatternRecord>*);
    void                     Matches (TListE <PatternMatches>*);
    
    String*                  Namefile (void);
    int                      Code (void);
    int                      NumberSeq (void);
    int                      CM (void);
    double                   CPercent (void);
    String*                  PP (void);
    int                      PL (void);
    int                      PN (void);
    int                      PX (void);
    int                      FN (void);
    int                      FL (void);
    int                      FP (void);
    bool                     BI (void);
    int                      BN (void);
    String*                  S (void);
    String*                  G (void);
    int                      E (void);
    bool                     R (void);
    bool                     RG (void);
    String*                  OF (void);
    bool                     OP (void);
    int                      ON (void);
    int                      OA (void);
    bool                     M (void);
    int                      MR (void);
    bool                     MV (void); 
    TListE <PatternRecord>*  Patterns (void);
    TListE <PatternMatches>* Matches (void);
    
    bool                     LoadDataFromFile (void);
    
    String*                  ToStringParameters (void);
    
    Pratt2Patterns           operator= (const Pratt2Patterns&);
    
};
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#endif
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//

